<?xml version='1.0' encoding='UTF-8' ?> 
<dev xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:p="http://primefaces.org/ui">>

    <c:set var="root" value="#{request.contextPath}" />

    <ui:composition template="../template/common.xhtml" >
        <ui:define name="topComponents">
            <c:set var="activeItem" value="usersPage"/>
            <ui:include src="../navigator.xhtml" />
        </ui:define>
        <ui:define name="content">
            <div class="span6">
                <h:form styleClass="well form-horizontal">
                    <fieldset>
                        <p:messages id="messages" showDetail="false" autoUpdate="true" closable="false" /> 
                        <div class="control-group"> 
                            <label class="control-label">User ID:</label>
                            <div class="controls">
                                <p:inputText label="User ID:" value="#{newUserCtrl.user.id}">
                                    <f:validateLength minimum="3" maximum="30"/>
                                </p:inputText>
                            </div>
                        </div>
                        <div class="control-group"> 
                            <label class="control-label">Name:</label>
                            <div class="controls">
                                <p:inputText label="Name:" value="#{newUserCtrl.user.name}">
                                    
                                </p:inputText>
                            </div>
                        </div>
                        <div class="control-group"> 
                            <label class="control-label">Password:</label>
                            <div class="controls">
                                <p:password label="Password:" value="#{newUserCtrl.user.password}">
                                    <f:validateLength minimum="6" maximum="30"/>
                                </p:password>
                            </div>
                        </div>
                        <div class="control-group"> 
                            <div class="controls">
                                <div class="btn-group">
                                    <h:commandButton tabindex="1" value="Clear" styleClass="btn" action="#{newUserCtrl.clear()}" />
                                    <h:commandButton tabindex="2" value="Create" styleClass="btn" action="#{newUserCtrl.create()}" />
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </h:form>
            </div>
        </ui:define>
    </ui:composition>
</dev>
